﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace winform全局异常
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int i = 10;
            int j = 0;
            int result = i / j;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            string path = "aa.txt";
            StreamReader sr = new StreamReader(path);
            string result = sr.ReadToEnd();
            Console.WriteLine(result);
        }
    }
}
